//
//  WKMnemonicsVeritfyVC.m
//  WuKongUsernameLogin
//
//  Created by tt on 2023/9/10.
//

#import "WKMnemonicsVeritfyVC.h"
#import "WKMnemonicsVeritfyVM.h"
@interface WKMnemonicsVeritfyVC ()

@end

@implementation WKMnemonicsVeritfyVC

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.viewModel = [WKMnemonicsVeritfyVM new];
    }
    return self;
}

- (void)viewDidLoad {


    NSMutableArray *newArray = [NSMutableArray arrayWithArray:self.mnemonics];
    [self shuffle:newArray];
    self.viewModel.mnemonics = newArray;
    self.viewModel.orgMnemonics = self.mnemonics;
    [super viewDidLoad];
    
    self.title = LLang(@"验证助记词");
    
    
    
    self.view.backgroundColor = WKApp.shared.config.cellBackgroundColor;
    
}

-(void)shuffle:(NSMutableArray*)oldArray{

    NSUInteger  count = oldArray.count;
    for (int i = 0; i < count; ++i) {

        int n = (arc4random() % (count - i)) + i;

        [oldArray exchangeObjectAtIndex:i withObjectAtIndex:n];

    }

        
}

@end
